#ifndef DODO_INIT_ARGS_H
#define DODO_INIT_ARGS_H

//there're still some repeated variables. e.g. wheel_num and sample_rate in welltempMore.h
//they are not actually used because we have WHEEL_NUM and SAMPLE_RATE in B3_defines.h.

long ppos[WHEEL_NUM + 1];
long wheel_v_current[WHEEL_NUM + 1];
long wheel_v_dest[WHEEL_NUM + 1];
keys_t keys1[KEY_NUM + 1];
keys_t keys2[KEY_NUM + 1];
drawbar_t drawbar1[DRAWBAR_NUM + 1];
drawbar_t drawbar2[DRAWBAR_NUM + 1];
drawbar_level_t drawbar_level[DRAWBAR_LEVEL_NUM];

#define WAV_BUF_MAX 100000000
smpl_t wav_buf[WAV_BUF_MAX];

void init_args() {
        int i;

        for (i = 1; i <= WHEEL_NUM; ++i) {
                wheel_v_dest[i] = 0;
                wheel_v_current[i] = 0;
        }

        drawbar_level[0] = 0;
        drawbar_level[1] = 16;
        drawbar_level[2] = 32;
        drawbar_level[3] = 48;
        drawbar_level[4] = 64;
        drawbar_level[5] = 80;
        drawbar_level[6] = 96;
        drawbar_level[7] = 112;
        drawbar_level[8] = 128;

        zero_all_drawbar(drawbar1);
        zero_all_drawbar(drawbar2);

        //although not needed for global variables. keeping this for clear.
        for (i = 1; i <= KEY_NUM; ++i) {
                keys1[i] = 0;
                keys2[i] = 0;
        }

}


#endif

